EINTR Interrupted system call 系统调用被禁止
Your write system call will be interrupted by the bus error signal SIGBUS, because you performed a bad memory access.
此时write系统调用会被进程接收到的SIGBUS信号中断,因为当前进程访问了非法内存地址。
By doing this the write system call returns with the number of bytes it wrote before it got interrupted and the errno set to success.
在这样处理方式下,write系统调用返回被信号中断前已写的字节数,并将errno全局变量设置为成功。
应用推荐